import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
const index = new Router({
  mode: 'history',
  base: 'pcError',
  routes: [
    {
      path: '/',
      name: 'pc-error',
      component: () => import('../views/Error'),
      meta: {
        title: '错误',
      },
    }
  ],
  scrollBehavior(to, from, savedPosition) {
    // return 期望滚动到哪个的位置
    if (savedPosition) {
      return savedPosition;
    } else {
      return { x: 0, y: 0 };
    }
  },
});

export default index;
